
import request from '@/utils/request'
export default {

    //添加设施
    add(data) {
        const url = `/v3/facility/facilityGroup/add`
        return request({
            url: url,
            method: 'post',
            data: {
                ...data
            }
        })
    },
    //编辑设施
    edit(data) {
        const url = `/v3/facility/facilityGroup/edit`
        return request({
            url: url,
            method: 'post',
            data: {
                ...data
            }
        })
    },//分页查询设施组
    queryPageByCondition(data) {
        const url = `/v3/facility/facilityGroup/queryPageByCondition`
        return request({
            url: url,
            method: 'post',
            data
        })
    },
    //删除设施组
    delList(list = []) {
        const url = `/v3/facility/facilityGroup/delListByNo`
        return request({
            url: url,
            method: 'post',
            data: {
                noList: list,
            }
        })
    },

    editFalseStatus(data) {
        const url = `/v3/facility/facilityGroup/editStatus`
        return request({
            url: url,
            method: 'post',
            data
        })
    },
    //查询所有设施组
    getfacilityGroupAll(data) {
        const url = '/v3/facility/facilityGroup/queryByCondition'
        return request({
            url: url,
            method: 'post',
            data: {
                groupStatus: false,
                ...data
            }
        })
    },
    //根据no查询设施组
    queryFacilityGroup(no) {
        const url = `/v3/facility/facilityGroup/queryFacilityDetailsByGroupNo?no=${no}`
        return request({
            url: url,
            method: 'get'
        })
    },
}
